//
// Created by mgepahmge on 2025/10/27.
//

#ifndef MYAMG_CUDAPROFILER_CUH
#define MYAMG_CUDAPROFILER_CUH
#include <utils/Profiler.h>

namespace myamg {
    class cudaScopedProfiler {
    public:
        cudaScopedProfiler(Profiler &profiler, const std::string &name, const std::string &location);

        ~cudaScopedProfiler();

    private:
        Profiler::ScopedTimer* timer_;
    };
}

#define CUDA_PROFILE_SCOPE(name) \
myamg::cudaScopedProfiler timer_##__COUNTER__(myamg::Profiler::instance(), name, __FILE__ ":" + std::to_string(__LINE__))

#endif //MYAMG_CUDAPROFILER_CUH